import { Request } from '../service/request';
import { message } from 'antd';


export function _getCode(data) {
	return Request.post('api/send', data);
}


export function phoneNumberTest(phone) {
	const reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
	if(!reg.test(phone)){
		message.error('请输入正确的手机号！');
	}
	return reg.test(phone)
}